Integrand size = 21, antiderivative size = 53 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=-\frac {(a+3 b) \text {arctanh}(\cos (e+f x))}{2 f}-\frac {(a+b) \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f} \]
Leaf count is larger than twice the leaf count of optimal. \(236\) vs. \(2(53)=106\).
Time = 0.87 (sec) , antiderivative size = 236, normalized size of antiderivative = 4.45 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=-\frac {a \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}-\frac {a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {3 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {3 b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {a \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \sin \left (\frac {1}{2} (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}-\frac {b \sin \left (\frac {1}{2} (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )} \]
-1/8*(a*Csc[(e + f*x)/2]^2)/f - (b*Csc[(e + f*x)/2]^2)/(8*f) - (a*Log[Cos[ (e + f*x)/2]])/(2*f) - (3*b*Log[Cos[(e + f*x)/2]])/(2*f) + (a*Log[Sin[(e + f*x)/2]])/(2*f) + (3*b*Log[Sin[(e + f*x)/2]])/(2*f) + (a*Sec[(e + f*x)/2] ^2)/(8*f) + (b*Sec[(e + f*x)/2]^2)/(8*f) + (b*Sin[(e + f*x)/2])/(f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])) - (b*Sin[(e + f*x)/2])/(f*(Cos[(e + f*x)/2 ] + Sin[(e + f*x)/2]))
Time = 0.23 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.13, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 4621, 361, 25, 359, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sec (e+f x)^2}{\sin (e+f x)^3}dx\) |
\(\Big \downarrow \) 4621 |
\(\displaystyle -\frac {\int \frac {\left (a \cos ^2(e+f x)+b\right ) \sec ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right )^2}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 361 |
\(\displaystyle -\frac {\frac {(a+b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}-\frac {1}{2} \int -\frac {\left ((a+b) \cos ^2(e+f x)+2 b\right ) \sec ^2(e+f x)}{1-\cos ^2(e+f x)}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\frac {1}{2} \int \frac {\left ((a+b) \cos ^2(e+f x)+2 b\right ) \sec ^2(e+f x)}{1-\cos ^2(e+f x)}d\cos (e+f x)+\frac {(a+b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}}{f}\) |
\(\Big \downarrow \) 359 |
\(\displaystyle -\frac {\frac {1}{2} \left ((a+3 b) \int \frac {1}{1-\cos ^2(e+f x)}d\cos (e+f x)-2 b \sec (e+f x)\right )+\frac {(a+b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}}{f}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\frac {1}{2} ((a+3 b) \text {arctanh}(\cos (e+f x))-2 b \sec (e+f x))+\frac {(a+b) \cos (e+f x)}{2 \left (1-\cos ^2(e+f x)\right )}}{f}\) |
-((((a + b)*Cos[e + f*x])/(2*(1 - Cos[e + f*x]^2)) + ((a + 3*b)*ArcTanh[Co s[e + f*x]] - 2*b*Sec[e + f*x])/2)/f)
3.1.6.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x _Symbol] :> Simp[c*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(a*e*(m + 1))), x] + Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(a*e^2*(m + 1)) Int[(e*x)^(m + 2)* (a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && !ILtQ[p, -1]
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : > Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[x^m*(a + b*x^2)^(p + 1)*E xpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)] - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && ILtQ[m/ 2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 2] && IntegerQ[n] && IntegerQ[p]
Time = 0.22 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.70
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )+b \left (-\frac {1}{2 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3}{2 \cos \left (f x +e \right )}+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(90\) |
default | \(\frac {a \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )+b \left (-\frac {1}{2 \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3}{2 \cos \left (f x +e \right )}+\frac {3 \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2}\right )}{f}\) | \(90\) |
norman | \(\frac {\frac {a +b}{8 f}+\frac {\left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{8 f}-\frac {\left (a +9 b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{4 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )}+\frac {\left (a +3 b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 f}\) | \(98\) |
parallelrisch | \(\frac {4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \left (a +3 b \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (a +b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (a +b \right ) \cot \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-2 a -18 b}{8 f \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-8 f}\) | \(98\) |
risch | \(\frac {{\mathrm e}^{i \left (f x +e \right )} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+3 b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a +3 b \right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) a}{2 f}-\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) b}{2 f}+\frac {\ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) a}{2 f}+\frac {3 \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) b}{2 f}\) | \(177\) |
1/f*(a*(-1/2*csc(f*x+e)*cot(f*x+e)+1/2*ln(csc(f*x+e)-cot(f*x+e)))+b*(-1/2/ sin(f*x+e)^2/cos(f*x+e)+3/2/cos(f*x+e)+3/2*ln(csc(f*x+e)-cot(f*x+e))))
Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (49) = 98\).
Time = 0.25 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.34 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{2} - {\left ({\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{3} - {\left (a + 3 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{3} - {\left (a + 3 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - 4 \, b}{4 \, {\left (f \cos \left (f x + e\right )^{3} - f \cos \left (f x + e\right )\right )}} \]
1/4*(2*(a + 3*b)*cos(f*x + e)^2 - ((a + 3*b)*cos(f*x + e)^3 - (a + 3*b)*co s(f*x + e))*log(1/2*cos(f*x + e) + 1/2) + ((a + 3*b)*cos(f*x + e)^3 - (a + 3*b)*cos(f*x + e))*log(-1/2*cos(f*x + e) + 1/2) - 4*b)/(f*cos(f*x + e)^3 - f*cos(f*x + e))
\[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \csc ^{3}{\left (e + f x \right )}\, dx \]
Time = 0.19 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.43 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=-\frac {{\left (a + 3 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - {\left (a + 3 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left ({\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, b\right )}}{\cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )}}{4 \, f} \]
-1/4*((a + 3*b)*log(cos(f*x + e) + 1) - (a + 3*b)*log(cos(f*x + e) - 1) - 2*((a + 3*b)*cos(f*x + e)^2 - 2*b)/(cos(f*x + e)^3 - cos(f*x + e)))/f
Leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (49) = 98\).
Time = 0.30 (sec) , antiderivative size = 193, normalized size of antiderivative = 3.64 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {2 \, {\left (a + 3 \, b\right )} \log \left (\frac {{\left | -\cos \left (f x + e\right ) + 1 \right |}}{{\left | \cos \left (f x + e\right ) + 1 \right |}}\right ) - \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {a + b + \frac {14 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac {a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {3 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}}{\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + \frac {{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}}}{8 \, f} \]
1/8*(2*(a + 3*b)*log(abs(-cos(f*x + e) + 1)/abs(cos(f*x + e) + 1)) - a*(co s(f*x + e) - 1)/(cos(f*x + e) + 1) - b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + (a + b + 14*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 3*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1) ^2)/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + (cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2))/f
Time = 17.32 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.17 \[ \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx=\frac {b-{\cos \left (e+f\,x\right )}^2\,\left (\frac {a}{2}+\frac {3\,b}{2}\right )}{f\,\left (\cos \left (e+f\,x\right )-{\cos \left (e+f\,x\right )}^3\right )}-\frac {\mathrm {atanh}\left (\cos \left (e+f\,x\right )\right )\,\left (\frac {a}{2}+\frac {3\,b}{2}\right )}{f} \]